/**
 *封装heart
 *
 *@param {*} body 
 */
function heartWith(body){
	this.body=body
	this.init=function(){
		this.monitor()
	}
	this.monitor=function(){
		var that=this
		document.onmousemove=function(event){
			var heart=document.createElement('div')
			heart.className="heart-with"
			var x=event.clientX,y=event.clientY
			//设置heart位置随鼠标出现
			heart.style.left=x+"px"
			heart.style.top=y+"px"
			//设置heart的大小随机Math.random(),返回0~1之间的数
			var size=Math.random()*100
			heart.style.width=size+"px"
			heart.style.height=size+"px"
			//将heart添加到body下
			that.body.appendChild(heart)
			//设置定时器，每两秒清理一次heart
			setInterval(function(){
				heart.remove()
			},2000)
		}
	}
	this.init()
}